﻿<%@ Page Title="" Language="C#" MasterPageFile="~/siteColecao.Master" AutoEventWireup="true" CodeBehind="DeletarItem.aspx.cs" Inherits="prjColecao.deletarItem" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="grdItemDeletar" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ITEM NO." DataSourceID="OracleConn2" AllowPaging="True" 
        onselectedindexchanged="grdItemDeletar_SelectedIndexChanged">
        <Columns>
            <asp:CommandField SelectText="Deletar" ShowSelectButton="True" />
            <asp:BoundField DataField="ITEM NO." HeaderText="ITEM NO." ReadOnly="True" 
                SortExpression="ITEM NO." />
            <asp:BoundField DataField="NOME" HeaderText="NOME" SortExpression="NOME" />
            <asp:BoundField DataField="DESCRICAO" HeaderText="DESCRICAO" 
                SortExpression="DESCRICAO" />
            <asp:BoundField DataField="MARCA" HeaderText="MARCA" SortExpression="MARCA" />
            <asp:BoundField DataField="FABRICANTE" HeaderText="FABRICANTE" 
                SortExpression="FABRICANTE" />
            <asp:BoundField DataField="ANO FABRICACAO" HeaderText="ANO FABRICACAO" 
                SortExpression="ANO FABRICACAO" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="OracleConn2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ColecaoConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ColecaoConnectionString.ProviderName %>" SelectCommand="SELECT ITEM.ID_ITEM AS &quot;ITEM NO.&quot;, 
            ITEM.NOME AS &quot;NOME&quot;, 
            ITEM.DESCRICAO AS &quot;DESCRICAO&quot;, 
            MARCA.NOME_MARCA AS &quot;MARCA&quot;,
            FABRICANTE.NOME_FABRICANTE AS &quot;FABRICANTE&quot; ,   
           TO_CHAR(ITEM.ANO_FABRICACAO,'DD-MM-YYYY') AS &quot;ANO FABRICACAO&quot;        
FROM COLECAO.ITEM, COLECAO.TIPO, COLECAO.MARCA, COLECAO.FABRICANTE
WHERE ITEM.ID_MARCA=MARCA.ID_MARCA AND
            ITEM.ID_TIPO=TIPO.ID_TIPO AND
            ITEM.ID_FABRICANTE=FABRICANTE.ID_FABRICANTE"></asp:SqlDataSource>
</asp:Content>
